<!--
 * @Descripttion:
 * @Author: YuZhenJing
 * @Date: 2020-01-05 15:27:58
 * @LastEditors: YuZhenJing
 * @LastEditTime: 2020-03-23 10:29:18
 -->
<template>
  <a v-if="data.funListType === 'group'" href="javaScript:void(0)" @click="handleClick">
    <slot />
  </a>
  <router-link v-else :to="data.funListUrl" @click.native="handleClick">
    <slot />
  </router-link>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      required: true
    }
  },
  methods: {
    handleClick() {
      this.$emit('handleClick', this.data)
    }
  }
}
</script>
